package com.crois.barrier.transport.transport;


/**
 * @author Hou Ze Yu
 * @description 心跳跳动发送
 * @date 2021/10/31
 */
public interface HeartBeatSender {

    /**
     * Send heartbeat to barrier admin.
     * 发送心跳到 管理端
     * @param adminServer
     * @param localAddress
     * @param serverPort
     * @return
     * @throws Exception
     */
    boolean sendHeartbeat(String serverName,String adminServer, String localAddress, int serverPort) throws Exception;

    /***
     * Default interval in milliseconds of the sender.
     * @return
     */
    long intervalMs();
}
